//
//  SeatGraphViewController.m
//  WebPDA
//
//  Created by Justin Yip on 10-7-23.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "SeatGraphViewController.h"
#import "CustomerDetailViewControllerWrapper.h"
#import "Passenger.h"
#import "SeatImageView.h"
#define IMG_TAG 123

@implementation SeatGraphViewController

@synthesize imageView;

- (void)viewDidLoad {
	self.title = @"舱位图";
}

//
// 查看旅客详细信息
//
- (IBAction)viewCustomerDetail:(id)sender {
	//CustomerDetailViewController *detailViewController = [[CustomerDetailViewController alloc] init];
	//detailViewController.customer = c;
	// ...
	// Pass the selected object to the new view controller.
	//[self.navigationController :detailViewController animated:YES];
	//UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:detailViewController];

	CustomerDetailViewControllerWrapper *detail = [[CustomerDetailViewControllerWrapper alloc] init];
	[self presentModalViewController:detail animated:YES];
	
	//[detailViewController release];
	//[navCtrl release];
	[detail release];
}


- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
	return [self.view viewWithTag:IMG_TAG];
}

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}
*/

/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	[imageView release];
	[super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


@end
